<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form th:action="@{/user/edit}" method="post">
    <input name="id"  th:value="${user.id}" type="hidden">
    姓名：<input type="text" name="name" th:value="${user.name}"/><br/>
    年龄：<input type="text" name="age" th:value="${user.age}"/><br/>
    地址：<input name="address" th:value="${user.address}"><br>
    生日：<input type="date" name="birthday" th:value="${#dates.format(user.birthday,'yyyy-MM-dd')}"/><br/>
    部门：<select name="did">
    <span th:each="dept : ${list}">
    <option th:value="${dept.id}">
        <td th:text="${dept.name}"></td>
    </option>
    </span>
</select>
    <input type="submit" value="修改"/><br/>
</form>
</body>
</html>